Pixeldev\SquareWooSync\Payments\WC_SquareSync_Gateway D

Total Complexity 264
Dependencies 13
Dependents 1
Total lines 1,949
Lines of code 1,254
Logical lines of code 616
Comment lines 370
Methods 36
Properties 6

Methods 36

Method Rating Maintainability Complexity Lines of code
process_payment()
D
25
35 160
ajax_recalculate_totals()
C
28
25 139
scheduled_subscription_payment()
B
36 16 75
build_payment_request()
A
37 14 75
build_payment_request_line_items()
A
42 15 49
enqueue_scripts()
A
39 11 67
get_product_payment_request()
A
42 12 47
get_payment_request_for_context()
A
43 12 47
allowed_for_cart()
A
54 13 18
ajax_get_payment_request()
A
50 10 25
payment_fields()
A
53 10 24
get_current_page()
A
56 10 17
get_state_code_by_name()
A
54 9 21
add_payment_method()
A
44 7 44
calculate_shipping()
S
47 6 35
__construct()
S
41 4 54
prepare_payment_data()
S
52 6 22
init_form_fields()
S
37 1 90
get_token_by_id()
S
57 6 15
process_admin_options()
S
55 5 20
getOrCreateSquareCustomerByUser()
S
50 4 28
on_square_sync_gateway_enabled()
S
59 5 13
attempt_create_square_order()
S
62 5 10
save_card_on_square()
S
54 2 23
finalize_order_payment()
S
55 2 20
validate_payment_response()
S
67 3 7
check_net_amount_due()
S
65 3 7
update_shipping_method()
S
65 3 9
get_cart_totals()
S
61 2 12
render_add_payment_method_form()
S
59 1 24
render_checkout_payment_form()
S
69 1 21
get_needs_shipping()
S
67 2 8
supported_product_types()
S
62 1 14
handle_error()
S
71 1 5
handle_exception()
S
70 1 5
remove_credit_card_fields()
S
74 1 4